package org.dizem.groupon.service;

import org.dizem.groupon.model.domain.UserEntity;

import java.util.List;

/**
 * User: dizem@126.com
 * Time: 11-6-27 上午10:57
 */
public interface UserService extends ServiceSupport<UserEntity> {
	boolean usernameOrEmailExists(String usernameOrEmail);

	boolean validateByUsername(String username, String password);

	boolean validateByEmail(String email, String password);

	boolean isUsernameExisted(String username);

	boolean isEmailExisted(String email);

	void register(UserEntity user, String cityName);

	UserEntity getByUsername(String username);

	List<UserEntity> loadAllAdmins();

	List<UserEntity> loadAllOrdinaryUsers();

	void update(UserEntity user, String cityName);

	boolean checkAuthCode(String username, String uid);
}
